Skip to content

chore(ci): move analyze and unit tests to a separate workflow#1568

Merged
Nirajn2311 merged 5 commits into
freeCodeCamp:mainfrom
huyenltnguyen:chore/unit-tests-workflow
Jul 2, 2025
Merged

chore(ci): move analyze and unit tests to a separate workflow#1568
Nirajn2311 merged 5 commits into
freeCodeCamp:mainfrom
huyenltnguyen:chore/unit-tests-workflow

Conversation

@huyenltnguyen
Copy link
Copy Markdown
Member

@huyenltnguyen huyenltnguyen commented Jun 26, 2025

Checklist:

Moves the code analysis and unit tests to a separate workflow.

I initially tried splitting them into 2 jobs, and having unit-tests depends on analyze:

jobs:
  analyze:
    steps:
      - checkout
      - setup flutter
      - install dependencies
      - setup .env
      - flutter analyze
  unit-tests:
    needs: analyze
    steps:  
      - checkout
      - setup flutter
      - install dependencies
      - setup .env
      - flutter test

But the flutter setup and deps installation takes a lot longer than the time to run the unit tests, so it wasn't worth it and I decided to just merge them into a single job.

@huyenltnguyen huyenltnguyen force-pushed the chore/unit-tests-workflow branch 2 times, most recently from a26b264 to 239c15c Compare June 26, 2025 19:35
@huyenltnguyen huyenltnguyen force-pushed the chore/unit-tests-workflow branch from 239c15c to 3035184 Compare June 26, 2025 19:39
@huyenltnguyen huyenltnguyen marked this pull request as ready for review June 26, 2025 20:19
@huyenltnguyen huyenltnguyen requested a review from a team June 26, 2025 20:19
Nirajn2311
Nirajn2311 previously approved these changes Jul 2, 2025
@Nirajn2311 Nirajn2311 merged commit c8a0f21 into freeCodeCamp:main Jul 2, 2025
3 of 5 checks passed
@huyenltnguyen huyenltnguyen deleted the chore/unit-tests-workflow branch July 7, 2025 21:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants